import QtQuick 2.0
import QtQuick.Controls 2.12
import QtQuick.Controls.impl 2.12

CheckBox {
    id: root
    height: font.pointSize*2
    text: "CheckBox"
//    font.pointSize: 15
//    font.family: "Arial"
//    font.bold: true
    property real textSize: 15
    property color checkedColor: "white"

    contentItem: CheckLabel {
        text: root.text
        font.pixelSize: textSize
        font.family: "楷体"
        font.bold: true
        color: "#41f9f9"
        horizontalAlignment: Text.AlignHCenter
        verticalAlignment: Text.AlignVCenter
        renderType: Text.NativeRendering
        elide: Text.ElideRight
        leftPadding: root.indicator.width + root.leftPadding
//        rightPadding: root.rightPadding
    }

    indicator: Rectangle {
        x: root.leftPadding
        anchors.verticalCenter: parent.verticalCenter
        width: textSize*1.3;
        height: width
        antialiasing: true
        radius: height/5
        border.width: radius/3
        border.color: root.checkedColor
        color: "#00000000"

        Rectangle {
            anchors.centerIn: parent
            width: parent.width*0.7; height: width
            antialiasing: true
            radius: parent.radius * 0.7
            color: root.checkedColor
            visible: root.checked
        }
    }
}

/*##^##
Designer {
    D{i:0;formeditorZoom:1.5}
}
##^##*/
